package com.macro.mall.service;

import com.macro.mall.common.exception.BusinessException;
import com.macro.mall.domain.Register;
import com.macro.mall.domain.UmsMember;


/**
 * 完成 Member 相关操作
 */
public interface MemberService {

    /**
     * 获取动态码
     *
     * @return otpCode 动态码
     */
    String getOtpCode(String telPhone) throws BusinessException;

    /**
     * 用户简单信息注册
     *
     * @return
     */
    int regite(Register register) throws BusinessException;

    /**
     * 登录
     * @param username 用户名
     * @param password 密码
     * @return 用户
     * @throws BusinessException 业务的错误信息
     */
    UmsMember login(String username, String password) throws BusinessException;
}
